package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBroadbandMapper;
import com.ruoyi.system.domain.SysBroadband;
import com.ruoyi.system.service.ISysBroadbandService;

/**
 * 宽带信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-10
 */
@Service
public class SysBroadbandServiceImpl implements ISysBroadbandService 
{
    @Autowired
    private SysBroadbandMapper sysBroadbandMapper;

    /**
     * 查询宽带信息
     * 
     * @param broadbandId 宽带信息主键
     * @return 宽带信息
     */
    @Override
    public SysBroadband selectSysBroadbandByBroadbandId(Long broadbandId)
    {
        return sysBroadbandMapper.selectSysBroadbandByBroadbandId(broadbandId);
    }

    /**
     * 查询宽带信息列表
     * 
     * @param sysBroadband 宽带信息
     * @return 宽带信息
     */
    @Override
    public List<SysBroadband> selectSysBroadbandList(SysBroadband sysBroadband)
    {
        return sysBroadbandMapper.selectSysBroadbandList(sysBroadband);
    }

    /**
     * 新增宽带信息
     * 
     * @param sysBroadband 宽带信息
     * @return 结果
     */
    @Override
    public int insertSysBroadband(SysBroadband sysBroadband)
    {
        sysBroadband.setCreateTime(DateUtils.getNowDate());
        return sysBroadbandMapper.insertSysBroadband(sysBroadband);
    }

    /**
     * 修改宽带信息
     * 
     * @param sysBroadband 宽带信息
     * @return 结果
     */
    @Override
    public int updateSysBroadband(SysBroadband sysBroadband)
    {
        sysBroadband.setUpdateTime(DateUtils.getNowDate());
        return sysBroadbandMapper.updateSysBroadband(sysBroadband);
    }

    /**
     * 批量删除宽带信息
     * 
     * @param broadbandIds 需要删除的宽带信息主键
     * @return 结果
     */
    @Override
    public int deleteSysBroadbandByBroadbandIds(Long[] broadbandIds)
    {
        return sysBroadbandMapper.deleteSysBroadbandByBroadbandIds(broadbandIds);
    }

    /**
     * 删除宽带信息信息
     * 
     * @param broadbandId 宽带信息主键
     * @return 结果
     */
    @Override
    public int deleteSysBroadbandByBroadbandId(Long broadbandId)
    {
        return sysBroadbandMapper.deleteSysBroadbandByBroadbandId(broadbandId);
    }
}
